<?php
/**
 * Unfuddle Repository Model
 *
 * @package     Unfuddle
 * @subpackage  Data Models
 * @author      Luke Visinoni <luke.visinoni@gmail.com>
 * @copyright   (c) 2010 Luke Visinoni <luke.visinoni@gmail.com>
 * @version     $Id: Repository.php 27 2011-01-15 10:33:26Z luke.visinoni $
 */
class Unfuddle_Model_Repository extends Unfuddle_Model_Abstract {

    protected $_name = 'repository';
    
    protected $_fields = array (
        'abbreviation' => array('type' => 'text', 'required' => false, 'read-only' => true),
        'account-id' => array('type' => 'integer', 'required' => false, 'read-only' => true),
        'created-at' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
        'description' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'id' => array('type' => 'integer', 'required' => false, 'read-only' => true),
        'system' => array('type' => 'set', 'required' => false, 'read-only' => true, 'set' => array('git', 'svn')),
        'title' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'updated-at' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
    );
    
    /**
     * If projects are specified on UPDATE, then the existing projects
     * will be completely replaced by the newly provided projects.
     */
    protected $_children = array('projects');

}